<template>
  <li class="item">
    <router-link :to="`/SongItem/${item.id}`">
    <img :src="item.picUrl" alt="" />
    <p>{{ item.playCount | formatNum}}</p>
    <h6>{{ item.name }}</h6>
    </router-link>
  </li>
</template>
<script>
export default {
  props: {
    item: Object,
  },
  filters:{
      formatNum(value){
          return (value/10000).toFixed(1)+'w'
      }
  }
};
</script>
<style lang="less" scoped>
.item {
  width: 30%;
  position: relative;
  img {
    width: 100%;
    border-radius: 15px;
  }
  p {
    position: absolute;
    right: 5px;
    top: 2px;
    z-index: 3;
    padding-left: 13px;
    color: #fff;
    font-size: 12px;
    background-position: 0;
    background-repeat: no-repeat;
    background-size: 11px 10px;
    text-shadow: 1px 0 0 rgb(0 ,0 ,0);
    background: url();
    background-repeat: no-repeat;
    background-size: 11px 10px;
    background-position:  0;
  }
  h6{
      padding: 0 2px 10px 10px;
      font-size: 13px;
      font-weight: 400;
      color: #333;
  }
}
</style>